package common;

public class JobObject {

	private String executeFilePath;
	private String executeFileName;
	private String parameters;
	private int time, extraTime;
	private long jobStartTime, jobEndTime;
	private int workerCost = 0;
	private int jobID;
	private int priority = 1;
    private String status = null;
    private String clientID = null;
    private int allocateWorkerID;

    public void setExecuteFilePath(String executeFilePath) {
		this.executeFilePath = executeFilePath;
	}

	public String getExecuteFilePath() {
		return executeFilePath;
	}

	public void setExecuteFileName(String executeFileName) {
		this.executeFileName = executeFileName;
	}

	public String getExecuteFileName() {
		return executeFileName;
	}

	public void setParameters(String parameters) {
		this.parameters = parameters;
	}

	public String getParameters() {
		return parameters;
	}

	public void setTime(int time) {
		this.time = time;
	}

	public int getTime() {
		return time;
	}

	public void setJobID(int jobID) {
		this.jobID = jobID;
	}

	public int getJobID() {
		return jobID;
	}

	public int getPriority() {
		return priority;
}

	public void setPriority(int priority) {
		this.priority = priority;
	}

    public void setStatus(String aStatus) {
		if(aStatus.equals("RUNNING")){this.status = aStatus;}
        if(aStatus.equals("WAITING")){this.status = aStatus;}
        if(aStatus.equals("COMPLETED")){this.status = aStatus;}
        if(aStatus.equals("FAILED")){this.status = aStatus;}
	}

    public String getStatus(){
        return status;
    }

    public void setClientID(String clientID){
        this.clientID = clientID;
    }

    public String getClientID(){
        return clientID;
    }
	public void setExtraTime(int extraTime) {
		this.extraTime = extraTime;
	}
	public int getExtraTime() {
		return extraTime;
	}

    public void setAllocateWorkerID(int allocateWorkerID){
        this.allocateWorkerID = allocateWorkerID;
    }

    public int getAllocateWorkerID(){
        return allocateWorkerID;
    }


	public void setJobEndTime(long endTime) {
		this.jobEndTime = endTime;
	}

	public long getJobEndTime() {
		return jobEndTime;
	}

	public void setWorkerCost(int workerCost) {
		this.workerCost = workerCost;
	}

	public int getWorkerCost() {
		return workerCost;
	}

	public void setJobStartTime(long jobStartTime) {
		this.jobStartTime = jobStartTime;
	}

	public long getJobStartTime() {
		return jobStartTime;
	}
}